package com.lyc.pojo;

import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import javax.annotation.Resource;

public class People {
    //如果显示定义了Autowired的request属性为false，则表示该属性可以为null，否则不允许为空
    @Autowired
    @Qualifier(value = "dog111")
    private Dog dog;
    @Autowired
    @Qualifier(value = "cat111")
    private Cat cat;
    private  String name;


    public Dog getDog() {
        return dog;
    }


    public Cat getCat() {
        return cat;
    }


    public String getName() {
        return name;
    }


    @Override
    public String toString() {
        return "People{" +
                "dog=" + dog +
                ", cat=" + cat +
                ", name='" + name + '\'' +
                '}';
    }
}
